package com.example.question.list.list1;

/**
 * @Date 2023-07-02
 * @Author Jonathan
 */
public class ListNode {
    public int val;
    public ListNode next;

    public ListNode(Integer val, ListNode next) {
        this.val = val;
        this.next = next;
    }

    public ListNode(Integer val) {
        this(val, null);
    }

    @Override
    public String toString() {
        return "ListNode{" + "val=" + val + ", next=" + next + '}';
    }
}
